package com.geeke.sys.vo;

import java.util.Date;

import com.geeke.sys.entity.User;

/**
 * 公司管理Entity
 * @author
 * @version
 */

public class OnlineUserVo {

    static public OnlineUserVo fromUser(User user) {
        OnlineUserVo onlineUserDto = new OnlineUserVo();
        onlineUserDto.setName(user.getName());
        onlineUserDto.setCompanyName(user.getCompany().getName());
        onlineUserDto.setDepartmentName(user.getDepartment().getName());
        onlineUserDto.setEmail(user.getEmail());
        onlineUserDto.setLoginName(user.getLoginName());
        onlineUserDto.setPhone(user.getPhone());
        return onlineUserDto;
    }

    private String companyName; // 公司

    private String departmentName; // 部门

    private String name; // 名称

    private String loginName; // 登录账号

    private String phone; // 手机号

    private String email; // 邮箱地址

    private String sessionId;

    /**
     * IP
     */
    private String ip;

    /**
     * token
     */
    private String key;

    /**
     * 登录时间
     */
    private Date loginTime;

    /**
     * 上次操作时间
     */
    private Date lastAccessTime;



    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public String getDepartmentName() {
        return departmentName;
    }

    public void setDepartmentName(String departmentName) {
        this.departmentName = departmentName;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public Date getLoginTime() {
        return loginTime;
    }

    public void setLoginTime(Date loginTime) {
        this.loginTime = loginTime;
    }

    public Date getLastAccessTime() {
        return lastAccessTime;
    }

    public void setLastAccessTime(Date lastAccessTime) {
        this.lastAccessTime = lastAccessTime;
    }

    public String getSessionId() {
        return sessionId;
    }

    public void setSessionId(String sessionId) {
        this.sessionId = sessionId;
    }
    
}
